home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 4.1 KB | 132 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Nothing.cpp
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef NOTHING_H
- #include "Nothing.h"
- #endif
-
- #ifndef NOTHDEF_H
- #include "NothDef.h"
- #endif
-
- // ----- Framework Includes -----
-
- #ifndef FWUTIL_H
- #include "FWUtil.h"
- #endif
-
- // ----- OS Layer Includes -----
-
- #ifndef FWCFMRES_H
- #include "FWCFMRes.h"
- #endif
-
- #ifndef FWRECSHP_H
- #include "FWRecShp.h"
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Runtime informations
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment odfnothing
- #endif
-
- //========================================================================================
- // Globals
- //========================================================================================
-
- const ODValueType CNothingPart::kPartKind = kODFNothingKind;
- const ODValueType CNothingPart::kPartUserName = kODFNothingEditorUserString;
-
- //========================================================================================
- // CLASS CNothingPart
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CNothingPart::CNothingPart
- //----------------------------------------------------------------------------------------
-
- CNothingPart::CNothingPart(ODPart* odPart):
- FW_CPart(odPart, CNothingPart::kPartKind, CNothingPart::kPartUserName, FW_gInstance, kPartIconID)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CNothingPart::~CNothingPart
- //----------------------------------------------------------------------------------------
-
- CNothingPart::~CNothingPart()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CNothingPart::Initialize
- //----------------------------------------------------------------------------------------
-
- void CNothingPart::Initialize(Environment* ev)
- {
- FW_CPart::Initialize(ev);
-
- RegisterPresentation(ev, "Apple:Presentation:ODFNothing", TRUE);
- }
-
- //----------------------------------------------------------------------------------------
- // CNothingPart::NewFrame
- //----------------------------------------------------------------------------------------
-
- FW_CFrame* CNothingPart::NewFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_Boolean fromStorage)
- {
- FW_UNUSED(presentation);
- FW_UNUSED(fromStorage);
-
- return new CNothingFrame(ev, odFrame, presentation, this);
- }
-
- //========================================================================================
- // CLASS CNothingFrame
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CNothingFrame::CNothingFrame
- //----------------------------------------------------------------------------------------
-
- CNothingFrame::CNothingFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, FW_CPart* part) :
- FW_CFrame(ev, odFrame, presentation, part)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CNothingFrame::~CNothingFrame
- //----------------------------------------------------------------------------------------
-
- CNothingFrame::~CNothingFrame()
- {
- }
-
- //----------------------------------------------------------------------------------------
- // CNothingFrame::Draw
- //----------------------------------------------------------------------------------------
-
- void CNothingFrame::Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape)
- {
- FW_CViewContext fc(ev, this, odFacet, invalidShape);
-
- FW_CRect box = GetBounds(ev);
- FW_CRectShape::RenderRect(fc, box, FW_kFill, FW_kRGBBlue);
- }
-